﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;

namespace Tradex.Market {

    /// <summary>
    /// This enumeratin contains the granularity of a price structure.
    /// 
    /// ActivitySizes are arranged in 2 groups and one special value.
    /// A 0 indicates undefined, and should not appear in data.
    /// The first group is 1 - 10 and is based on 10.
    /// The second group is 20 to 39 and is based on 2.
    /// one for base 10 (PriceType 1-19) and one for base 2 (PriceType 20-39).
    /// The 
    /// It is notable that the ActivitySizes 10 and 30 are identical. This is to allow easier and to still
    /// have a complete progression table for both base numbers.
    /// </summary>
    [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1028")]
    public enum PriceCoding : byte {

        /// <summary>
        /// Defines an undefined market update size. This normally indicates no value set or an error.
        /// </summary>
        Undefined = 0,

        /// <summary>
        /// Exponent 10^-9 = 0.000 000 001
        /// </summary>
        B10EM9= 1,

        /// <summary>
        /// Exponent 10^-8 = 0.000 000 01
        /// </summary>
        B10EM8= 2,

        /// <summary>
        /// Exponent 10^-7 = 0.000 000 1
        /// </summary>
        B10EM7 = 3,

        /// <summary>
        /// Exponent 10^-6 = 0.000 001
        /// </summary>
        B10EM6 = 4,

        /// <summary>
        /// Exponent 10^-5 = 0.000 01
        /// </summary>
        B10EM5 = 5,

        /// <summary>
        /// Exponent 10^-4 = 0.000 1
        /// </summary>
        B10EM4 = 6,

        /// <summary>
        /// Exponent 10^-3 = 0.001 0
        /// </summary>
        B10EM3 = 7,

        /// <summary>
        /// Exponent 10^-2 = 0.0100
        /// </summary>
        B10EM2 = 8,

        /// <summary>
        /// Exponent 10^-1 = 0.1000
        /// </summary>
        B10EM1 = 9,

        /// <summary>
        /// Exponent 10^0 = 1.0000
        /// </summary>
        B10E0  = 10,

        /// <summary>
        /// Exponent 10^1 = 10.0000
        /// </summary>
        B10EP1 = 11,

        /// <summary>
        /// Exponent 10^2 = 100.0000
        /// </summary>
        B10EP2 = 12,

        /// <summary>
        /// Exponent 10^3 = 1000.0000
        /// </summary>
        B10EP3 = 13,

        /// <summary>
        /// Exponent 10^4 = 10 000.0000
        /// </summary>
        B10EP4 = 14,

        /// <summary>
        /// Exponent 10^5 = 100 000.0000
        /// </summary>
        B10EP5 = 15,

        /// <summary>
        /// Exponent 10^6 = 1 000 000.0000
        /// </summary>
        B10EP6 = 16,

        /// <summary>
        /// Exponent 10^7 = 10 000 000.0000
        /// </summary>
        B10EP7 = 17,

        /// <summary>
        /// Exponent 10^8 = 100 000 000.0000
        /// </summary>
        B10EP8 = 18,

        /// <summary>
        /// Exponent 10^9 = 1 000 000 000.0000
        /// </summary>
        B10EP9 = 19,

        /// <summary>
        /// Exponent 2^-9 = 0.001953125
        /// </summary>
        B2EM9 = 20,

        /// <summary>
        /// Exponent 2^-8 = 0.00390625
        /// </summary>
        B2EM8 = 21,

        /// <summary>
        /// Exponent 2^-7 = 0.0078125
        /// </summary>
        B2EM7 = 22,

        /// <summary>
        /// Exponent 2^-6 = 0.015625
        /// </summary>
        B2EM6 = 23,
        
        /// <summary>
        /// Exponent 2^-5 = 0.03125
        /// </summary>
        B2EM5 = 24,
        
        /// <summary>
        /// Exponent 2^-4 = 0.0625
        /// </summary>
        B2EM4 = 25,

        /// <summary>
        /// Exponent 2^-3 = 0.125
        /// </summary>
        B2EM3 = 26,

        /// <summary>
        /// Exponent 2^-2 = 0.25
        /// </summary>
        B2EM2 = 27,

        /// <summary>
        /// Exponent 2^-1  =0.5
        /// </summary>
        B2EM1 = 28,

        /// <summary>
        /// Exponent 2^0 = 1
        /// </summary>
        B2E0  = 29,

        /// <summary>
        /// Exponent 2^1 = 2
        /// </summary>
        B2EP1 = 30,

        /// <summary>
        /// Exponent 2^2 = 4 
        /// </summary>
        B2EP2 = 31,

        /// <summary>
        /// Exponent 2^3 = 8
        /// </summary>
        B2EP3 = 32,

        /// <summary>
        /// Exponent 2^4 = 16
        /// </summary>
        B2EP4 = 33,

        /// <summary>
        /// Exponent 2^5 = 32
        /// </summary>
        B2EP5 = 34,

        /// <summary>
        /// Exponent 2^6 = 64
        /// </summary>
        B2EP6 = 35,

        /// <summary>
        /// Exponent 2^7 = 128
        /// </summary>
        B2EP7 = 36,

        /// <summary>
        /// Exponent 2^8 = 256
        /// </summary>
        B2EP8 = 37,

        /// <summary>
        /// Exponent 2^9 = 512
        /// </summary>
        B2EP9 = 38

    }

}
